// 静态路由
const Routers = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/home',
    component: () => import('@/Layout/main.vue'),
    meta: { requiresAuth: true, title: '首页' },
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/Home.vue'),
        meta: { roles: ["Admin", "SuperAdmin"], title: '首页' },
      },
      {
        path: '/personhome',
        name: 'personHome',
        component: () => import('@/views/Pages/PersonHome.vue'),
        meta: { roles: ["Admin", "SuperAdmin"], title: '个人主页' }
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login/index.vue'),
    meta: { title: '登录' }
  },
  {
    path: '/404',
    name: 'NotFound',
    component: () => import('@/views/Error/NotFound.vue'),
    meta: { title: '404' }
  },
  {
    path: '/500',
    name: 'ServerError',
    component: () => import('@/views/Error/ServerError.vue'),
    meta: { title: '500' }
  },
]

export default Routers;
